package org.ytor.core.sqlflow.builder;

import lombok.Data;
import lombok.experimental.Accessors;
import org.ytor.core.sqlflow.SFunction;
import org.ytor.core.sqlflow.builder.support.WhereBuilder;
import org.ytor.core.sqlflow.enums.SqlType;

import java.util.List;

/**
 * created by yangtong on 2025/8/14 11:15:51
 * <br/>
 * 封装了SQL的信息
 */
@Data
@Accessors(chain=true)
public class SqlEntity {

    /**
     * SQL 类型
     */
    private SqlType sqlType;

    /**
     * 是否批量操作
     */
    private Boolean isBatch;

    /**
     * 查询字段
     */
    private List<SFunction<?, ?>> selectFnFields;

    /**
     * 查询字段
     */
    private List<String> selectRawFields;

    /**
     * WHERE子句
     */
    private WhereBuilder where;

    /**
     * 执行的SQL
     */
    private String sql;

    /**
     * 参数
     */
    private List<Object> params;

    /**
     * 批量参数
     */
    private List<List<Object>> batchParams;
}
